package org.peoples.users {
	
	import com.qualityattributes.utils.IEqualable;
	
	[RemoteClass(alias="org.peoples.clients.User")]
	public class User implements IEqualable {
		
		public var ID:int;
		public var firstName:String;
		public var lastName:String;
		public var time:Date;
		public var streamID:String;
		
		public function User():void {
			
		}
		
		public function equals(o:Object):Boolean {
			if (this == o)
				return true;
				
			if (! (o is User))
				return false;
				
			var u:User = o as User;
			if (this.ID == u.ID)
				return true;
				
			return false;
		}
		
		public function hashCode():int {
			return ID;
		}
		
		public function toString():String {
			return "User " + ID + ": " + firstName + " " + lastName;
		}
		
	}
	
}